﻿using System;
using System.Collections.Generic;
using UnityEngine;

// Token: 0x0200021E RID: 542
public class H_Expression_Male : MonoBehaviour
{
	// Token: 0x06000EB9 RID: 3769 RVA: 0x0005C8E0 File Offset: 0x0005AAE0
	public void Setup()
	{
		H_Expression_Male.Setup_Dictionary(this.eyeDic, this.eyeList);
		H_Expression_Male.Setup_Dictionary(this.mouthDic, this.mouthList);
		this.data = new H_ExpressionData_Male(this, this.expressionList);
	}

	// Token: 0x06000EBA RID: 3770 RVA: 0x0005C918 File Offset: 0x0005AB18
	public string EyeName(string name)
	{
		if (this.eyeDic.ContainsKey(name))
		{
			return this.eyeDic[name];
		}
		GlobalData.Debug_LogError("眼睛的表情：" + name + " 找不到");
		return "Eye_Def";
	}

	// Token: 0x06000EBB RID: 3771 RVA: 0x0005C954 File Offset: 0x0005AB54
	public string MouthName(string name)
	{
		if (this.mouthDic.ContainsKey(name))
		{
			return this.mouthDic[name];
		}
		GlobalData.Debug_LogError("嘴巴的表情：" + name + " 找不到");
		return "Mouth_Def";
	}

	// Token: 0x06000EBC RID: 3772 RVA: 0x0005C990 File Offset: 0x0005AB90
	private static void Setup_Dictionary(Dictionary<string, string> dic, TextAsset text)
	{
		CustomDataListLoader customDataListLoader = new CustomDataListLoader();
		customDataListLoader.Load(text);
		int attributeNo = customDataListLoader.GetAttributeNo("anime");
		int attributeNo2 = customDataListLoader.GetAttributeNo("name");
		for (int i = 0; i < customDataListLoader.GetDataNum(); i++)
		{
			string value = customDataListLoader.GetData(attributeNo, i);
			string key = customDataListLoader.GetData(attributeNo2, i);
			dic.Add(key, value);
		}
	}

	// Token: 0x06000EBD RID: 3773 RVA: 0x0005C9F8 File Offset: 0x0005ABF8
	public H_ExpressionData_Male.Data ChangeExpression(Male male, H_Expression_Male.TYPE type, H_Parameter param)
	{
		if (!this.isUpdate)
		{
			return null;
		}
		return this.data.ChangeExpression(male, type, param, this.duration);
	}

	// Token: 0x04000F62 RID: 3938
	[SerializeField]
	private TextAsset expressionList;

	// Token: 0x04000F63 RID: 3939
	[SerializeField]
	private TextAsset eyeList;

	// Token: 0x04000F64 RID: 3940
	[SerializeField]
	private TextAsset mouthList;

	// Token: 0x04000F65 RID: 3941
	[SerializeField]
	private float duration = 0.2f;

	// Token: 0x04000F66 RID: 3942
	private H_ExpressionData_Male data;

	// Token: 0x04000F67 RID: 3943
	private Dictionary<string, string> eyeDic = new Dictionary<string, string>();

	// Token: 0x04000F68 RID: 3944
	private Dictionary<string, string> mouthDic = new Dictionary<string, string>();

	// Token: 0x04000F69 RID: 3945
	[SerializeField]
	private bool isUpdate = true;

	// Token: 0x0200021F RID: 543
	public enum STATE
	{
		// Token: 0x04000F6B RID: 3947
		NORMAL,
		// Token: 0x04000F6C RID: 3948
		HATE
	}

	// Token: 0x02000220 RID: 544
	public enum TYPE
	{
		// Token: 0x04000F6E RID: 3950
		NORMAL,
		// Token: 0x04000F6F RID: 3951
		EJACULATION,
		// Token: 0x04000F70 RID: 3952
		NUM
	}
}
